import 'package:flutter_taotaoshipin/generated/json/base/json_field.dart';
import 'package:flutter_taotaoshipin/generated/json/goods_list_entity.g.dart';
import 'dart:convert';
export 'package:flutter_taotaoshipin/generated/json/goods_list_entity.g.dart';

@JsonSerializable()
class GoodsListEntity {
	int? id = 0;
	String? name = '';
	@JSONField(name: "bottom_text")
	String? bottomText = '';
	@JSONField(name: "goods_type")
	int? goodsType = 0;
	String? spec = '';
	double? amount;
	@JSONField(name: "sub_amount")
	double? subAmount;
	int? money = 0;
	@JSONField(name: "give_money")
	int? giveMoney = 0;
	int? days = 0;
	int? light = 0;
	String? subscript = '';
	GoodsListConfig? config;
	int? ctime = 0;

	GoodsListEntity();

	factory GoodsListEntity.fromJson(Map<String, dynamic> json) => $GoodsListEntityFromJson(json);

	Map<String, dynamic> toJson() => $GoodsListEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class GoodsListConfig {
	@JSONField(name: "apple_goods_id")
	String? appleGoodsId = '';

	GoodsListConfig();

	factory GoodsListConfig.fromJson(Map<String, dynamic> json) => $GoodsListConfigFromJson(json);

	Map<String, dynamic> toJson() => $GoodsListConfigToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}